const db = require('../app/database');
class Services{
  async login(username,password){
    let sql = `select * from user where phone = ? and password = ? `;
    const results = await db.execute(sql,[username,password])
    return results[0]
  }
  async canReg(telNumber){
    let sql = `select * from user where phone = ? `;
    const results = await db.execute(sql,[telNumber])
    return results[0]
  }
}
module.exports = new Services();